//------------------------------------------------------------------------------------------------------
//   _____     _______ ____  _     ___  ____  ____    _____ _   _  ____ ___ _   _ _____   ______  ___ _ 
//  / _ \ \   / / ____|  _ \| |   / _ \|  _ \|  _ \  | ____| \ | |/ ___|_ _| \ | | ____| |  _ \ \/ / / |
// | | | \ \ / /|  _| | |_) | |  | | | | |_) | | | | |  _| |  \| | |  _ | ||  \| |  _|   | | | \  /| | |
// | |_| |\ V / | |___|  _ <| |__| |_| |  _ <| |_| | | |___| |\  | |_| || || |\  | |___  | |_| /  \| | |
//  \___/  \_/  |_____|_| \_\_____\___/|_| \_\____/  |_____|_| \_|\____|___|_| \_|_____| |____/_/\_\_|_|
//
// Overlord Engine v1.81
// Copyright Overlord Thomas Goussaert & Overlord Brecht Kets
// http://www.digitalartsandentertainment.com/
//------------------------------------------------------------------------------------------------------
//Precompiled Header [ALWAYS ON TOP IN CPP]
#include "Base\stdafx.h"

#include "PostGrayscale.h"
#include "Base/GeneralStructs.h"
#include "..\..\OverlordEngine\Graphics\RenderTarget.h"

ID3DX11EffectShaderResourceVariable* PostGrayscale::m_pSRVvariable = nullptr;
PostGrayscale::PostGrayscale() : 
	PostProcessingMaterial(L"./Resources/Effects/Grayscale.fx", 0, L"Grayscale")
{
}


PostGrayscale::~PostGrayscale()
{
}

void PostGrayscale::LoadEffectVariables()
{
	m_pSRVvariable = m_pEffect->GetVariableByName("gTexture")->AsShaderResource();
}

void PostGrayscale::UpdateEffectVariables(RenderTarget* rendertarget)
{
	UNREFERENCED_PARAMETER(rendertarget);

	m_pSRVvariable->SetResource(rendertarget->GetShaderResourceView());
}